Optimal. Leaf size=406 \[ -\frac {\left (6 a^2 b^2 c \left (c^2-3 d^2\right )-b^4 c \left (c^2-3 d^2\right )-4 a^3 b d \left (3 c^2-d^2\right )+4 a b^3 d \left (3 c^2-d^2\right )-a^4 \left (c^3-3 c d^2\right )\right ) x}{\left (c^2+d^2\right )^3}-\frac {\left (4 a^3 b c \left (c^2-3 d^2\right )-4 a b^3 c \left (c^2-3 d^2\right )+6 a^2 b^2 d \left (3 c^2-d^2\right )-b^4 d \left (3 c^2-d^2\right )-a^4 \left (3 c^2 d-d^3\right )\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^3 f}+\frac {(b c-a d)^2 \left (a^2 d^2 \left (3 c^2-d^2\right )+2 a b c d \left (c^2+5 d^2\right )+b^2 \left (c^4+3 c^2 d^2+6 d^4\right )\right ) \log (c+d \tan (e+f x))}{d^3 \left (c^2+d^2\right )^3 f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{2 d \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {(b c-a d)^3 \left (2 a c d+b \left (c^2+3 d^2\right )\right )}{d^3 \left (c^2+d^2\right )^2 f (c+d \tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.53, antiderivative size = 406, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3646, 3716,
3707, 3698, 31, 3556} \begin {gather*} \frac {\left (a^2 d^2 \left (3 c^2-d^2\right )+2 a b c d \left (c^2+5 d^2\right )+b^2 \left (c^4+3 c^2 d^2+6 d^4\right )\right ) (b c-a d)^2 \log (c+d \tan (e+f x))}{d^3 f \left (c^2+d^2\right )^3}-\frac {\left (-\left (a^4 \left (3 c^2 d-d^3\right )\right )+4 a^3 b c \left (c^2-3 d^2\right )+6 a^2 b^2 d \left (3 c^2-d^2\right )-4 a b^3 c \left (c^2-3 d^2\right )-b^4 d \left (3 c^2-d^2\right )\right ) \log (\cos (e+f x))}{f \left (c^2+d^2\right )^3}-\frac {x \left (-\left (a^4 \left (c^3-3 c d^2\right )\right )-4 a^3 b d \left (3 c^2-d^2\right )+6 a^2 b^2 c \left (c^2-3 d^2\right )+4 a b^3 d \left (3 c^2-d^2\right )-b^4 c \left (c^2-3 d^2\right )\right )}{\left (c^2+d^2\right )^3}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{2 d f \left (c^2+d^2\right ) (c+d \tan (e+f x))^2}+\frac {\left (2 a c d+b \left (c^2+3 d^2\right )\right ) (b c-a d)^3}{d^3 f \left (c^2+d^2\right )^2 (c+d \tan (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3556
Rule 3646
Rule 3698
Rule 3707
Rule 3716
Rubi steps
\begin {align*} \int \frac {(a+b \tan (e+f x))^4}{(c+d \tan (e+f x))^3} \, dx &=-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{2 d \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {\int \frac {(a+b \tan (e+f x)) \left (2 \left (b^3 c^2+a^3 c d-3 a b^2 c d+3 a^2 b d^2\right )+2 d \left (3 a^2 b c-b^3 c-a^3 d+3 a b^2 d\right ) \tan (e+f x)+2 b^3 \left (c^2+d^2\right ) \tan ^2(e+f x)\right )}{(c+d \tan (e+f x))^2} \, dx}{2 d \left (c^2+d^2\right )}\\ &=-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{2 d \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {(b c-a d)^3 \left (2 a c d+b \left (c^2+3 d^2\right )\right )}{d^3 \left (c^2+d^2\right )^2 f (c+d \tan (e+f x))}+\frac {\int \frac {2 \left (8 a^3 b c d^3-8 a b^3 c d^3+a^4 d^2 \left (c^2-d^2\right )-6 a^2 b^2 d^2 \left (c^2-d^2\right )+b^4 \left (c^4+3 c^2 d^2\right )\right )+4 d^2 \left (a^2 c-b^2 c+2 a b d\right ) \left (2 a b c-a^2 d+b^2 d\right ) \tan (e+f x)+2 b^4 \left (c^2+d^2\right )^2 \tan ^2(e+f x)}{c+d \tan (e+f x)} \, dx}{2 d^2 \left (c^2+d^2\right )^2}\\ &=-\frac {\left (6 a^2 b^2 c \left (c^2-3 d^2\right )-b^4 c \left (c^2-3 d^2\right )-4 a^3 b d \left (3 c^2-d^2\right )+4 a b^3 d \left (3 c^2-d^2\right )-a^4 \left (c^3-3 c d^2\right )\right ) x}{\left (c^2+d^2\right )^3}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{2 d \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {(b c-a d)^3 \left (2 a c d+b \left (c^2+3 d^2\right )\right )}{d^3 \left (c^2+d^2\right )^2 f (c+d \tan (e+f x))}+\frac {\left (4 a^3 b c \left (c^2-3 d^2\right )-4 a b^3 c \left (c^2-3 d^2\right )+6 a^2 b^2 d \left (3 c^2-d^2\right )-b^4 d \left (3 c^2-d^2\right )-a^4 \left (3 c^2 d-d^3\right )\right ) \int \tan (e+f x) \, dx}{\left (c^2+d^2\right )^3}+\frac {\left ((b c-a d)^2 \left (a^2 d^2 \left (3 c^2-d^2\right )+2 a b c d \left (c^2+5 d^2\right )+b^2 \left (c^4+3 c^2 d^2+6 d^4\right )\right )\right ) \int \frac {1+\tan ^2(e+f x)}{c+d \tan (e+f x)} \, dx}{d^2 \left (c^2+d^2\right )^3}\\ &=-\frac {\left (6 a^2 b^2 c \left (c^2-3 d^2\right )-b^4 c \left (c^2-3 d^2\right )-4 a^3 b d \left (3 c^2-d^2\right )+4 a b^3 d \left (3 c^2-d^2\right )-a^4 \left (c^3-3 c d^2\right )\right ) x}{\left (c^2+d^2\right )^3}-\frac {\left (4 a^3 b c \left (c^2-3 d^2\right )-4 a b^3 c \left (c^2-3 d^2\right )+6 a^2 b^2 d \left (3 c^2-d^2\right )-b^4 d \left (3 c^2-d^2\right )-a^4 \left (3 c^2 d-d^3\right )\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^3 f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{2 d \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {(b c-a d)^3 \left (2 a c d+b \left (c^2+3 d^2\right )\right )}{d^3 \left (c^2+d^2\right )^2 f (c+d \tan (e+f x))}+\frac {\left ((b c-a d)^2 \left (a^2 d^2 \left (3 c^2-d^2\right )+2 a b c d \left (c^2+5 d^2\right )+b^2 \left (c^4+3 c^2 d^2+6 d^4\right )\right )\right ) \text {Subst}\left (\int \frac {1}{c+x} \, dx,x,d \tan (e+f x)\right )}{d^3 \left (c^2+d^2\right )^3 f}\\ &=-\frac {\left (6 a^2 b^2 c \left (c^2-3 d^2\right )-b^4 c \left (c^2-3 d^2\right )-4 a^3 b d \left (3 c^2-d^2\right )+4 a b^3 d \left (3 c^2-d^2\right )-a^4 \left (c^3-3 c d^2\right )\right ) x}{\left (c^2+d^2\right )^3}-\frac {\left (4 a^3 b c \left (c^2-3 d^2\right )-4 a b^3 c \left (c^2-3 d^2\right )+6 a^2 b^2 d \left (3 c^2-d^2\right )-b^4 d \left (3 c^2-d^2\right )-a^4 \left (3 c^2 d-d^3\right )\right ) \log (\cos (e+f x))}{\left (c^2+d^2\right )^3 f}+\frac {(b c-a d)^2 \left (a^2 d^2 \left (3 c^2-d^2\right )+2 a b c d \left (c^2+5 d^2\right )+b^2 \left (c^4+3 c^2 d^2+6 d^4\right )\right ) \log (c+d \tan (e+f x))}{d^3 \left (c^2+d^2\right )^3 f}-\frac {(b c-a d)^2 (a+b \tan (e+f x))^2}{2 d \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {(b c-a d)^3 \left (2 a c d+b \left (c^2+3 d^2\right )\right )}{d^3 \left (c^2+d^2\right )^2 f (c+d \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 7.05, size = 2775, normalized size = 6.83 \begin {gather*} \text {Result too large to show} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.50, size = 553, normalized size = 1.36
method | result | size |
derivativedivides | \(\frac {-\frac {a^{4} d^{4}-4 a^{3} b c \,d^{3}+6 a^{2} b^{2} c^{2} d^{2}-4 a \,b^{3} c^{3} d +b^{4} c^{4}}{2 d^{3} \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )^{2}}-\frac {2 a^{4} c \,d^{4}-4 a^{3} b \,c^{2} d^{3}+4 a^{3} b \,d^{5}-12 a^{2} b^{2} c \,d^{4}+4 a \,b^{3} c^{4} d +12 a \,b^{3} c^{2} d^{3}-2 b^{4} c^{5}-4 b^{4} c^{3} d^{2}}{d^{3} \left (c^{2}+d^{2}\right )^{2} \left (c +d \tan \left (f x +e \right )\right )}+\frac {\left (3 a^{4} c^{2} d^{4}-a^{4} d^{6}-4 a^{3} b \,c^{3} d^{3}+12 a^{3} b c \,d^{5}-18 a^{2} b^{2} c^{2} d^{4}+6 a^{2} b^{2} d^{6}+4 a \,b^{3} c^{3} d^{3}-12 a \,b^{3} c \,d^{5}+b^{4} c^{6}+3 b^{4} c^{4} d^{2}+6 b^{4} c^{2} d^{4}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{3} d^{3}}+\frac {\frac {\left (-3 a^{4} c^{2} d +a^{4} d^{3}+4 a^{3} b \,c^{3}-12 a^{3} b c \,d^{2}+18 a^{2} b^{2} c^{2} d -6 a^{2} b^{2} d^{3}-4 a \,b^{3} c^{3}+12 a \,b^{3} c \,d^{2}-3 b^{4} c^{2} d +b^{4} d^{3}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (a^{4} c^{3}-3 a^{4} c \,d^{2}+12 a^{3} b \,c^{2} d -4 a^{3} b \,d^{3}-6 a^{2} b^{2} c^{3}+18 a^{2} b^{2} c \,d^{2}-12 a \,b^{3} c^{2} d +4 a \,b^{3} d^{3}+b^{4} c^{3}-3 b^{4} c \,d^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{3}}}{f}\) | \(553\) |
default | \(\frac {-\frac {a^{4} d^{4}-4 a^{3} b c \,d^{3}+6 a^{2} b^{2} c^{2} d^{2}-4 a \,b^{3} c^{3} d +b^{4} c^{4}}{2 d^{3} \left (c^{2}+d^{2}\right ) \left (c +d \tan \left (f x +e \right )\right )^{2}}-\frac {2 a^{4} c \,d^{4}-4 a^{3} b \,c^{2} d^{3}+4 a^{3} b \,d^{5}-12 a^{2} b^{2} c \,d^{4}+4 a \,b^{3} c^{4} d +12 a \,b^{3} c^{2} d^{3}-2 b^{4} c^{5}-4 b^{4} c^{3} d^{2}}{d^{3} \left (c^{2}+d^{2}\right )^{2} \left (c +d \tan \left (f x +e \right )\right )}+\frac {\left (3 a^{4} c^{2} d^{4}-a^{4} d^{6}-4 a^{3} b \,c^{3} d^{3}+12 a^{3} b c \,d^{5}-18 a^{2} b^{2} c^{2} d^{4}+6 a^{2} b^{2} d^{6}+4 a \,b^{3} c^{3} d^{3}-12 a \,b^{3} c \,d^{5}+b^{4} c^{6}+3 b^{4} c^{4} d^{2}+6 b^{4} c^{2} d^{4}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{3} d^{3}}+\frac {\frac {\left (-3 a^{4} c^{2} d +a^{4} d^{3}+4 a^{3} b \,c^{3}-12 a^{3} b c \,d^{2}+18 a^{2} b^{2} c^{2} d -6 a^{2} b^{2} d^{3}-4 a \,b^{3} c^{3}+12 a \,b^{3} c \,d^{2}-3 b^{4} c^{2} d +b^{4} d^{3}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (a^{4} c^{3}-3 a^{4} c \,d^{2}+12 a^{3} b \,c^{2} d -4 a^{3} b \,d^{3}-6 a^{2} b^{2} c^{3}+18 a^{2} b^{2} c \,d^{2}-12 a \,b^{3} c^{2} d +4 a \,b^{3} d^{3}+b^{4} c^{3}-3 b^{4} c \,d^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right )^{3}}}{f}\) | \(553\) |
norman | \(\frac {\frac {\left (a^{4} c^{3}-3 a^{4} c \,d^{2}+12 a^{3} b \,c^{2} d -4 a^{3} b \,d^{3}-6 a^{2} b^{2} c^{3}+18 a^{2} b^{2} c \,d^{2}-12 a \,b^{3} c^{2} d +4 a \,b^{3} d^{3}+b^{4} c^{3}-3 b^{4} c \,d^{2}\right ) c^{2} x}{\left (c^{4}+2 c^{2} d^{2}+d^{4}\right ) \left (c^{2}+d^{2}\right )}+\frac {d^{2} \left (a^{4} c^{3}-3 a^{4} c \,d^{2}+12 a^{3} b \,c^{2} d -4 a^{3} b \,d^{3}-6 a^{2} b^{2} c^{3}+18 a^{2} b^{2} c \,d^{2}-12 a \,b^{3} c^{2} d +4 a \,b^{3} d^{3}+b^{4} c^{3}-3 b^{4} c \,d^{2}\right ) x \left (\tan ^{2}\left (f x +e \right )\right )}{\left (c^{4}+2 c^{2} d^{2}+d^{4}\right ) \left (c^{2}+d^{2}\right )}-\frac {5 a^{4} c^{2} d^{4}+a^{4} d^{6}-12 a^{3} b \,c^{3} d^{3}+4 a^{3} b c \,d^{5}+6 a^{2} b^{2} c^{4} d^{2}-18 a^{2} b^{2} c^{2} d^{4}+4 a \,b^{3} c^{5} d +20 a \,b^{3} c^{3} d^{3}-3 b^{4} c^{6}-7 b^{4} c^{4} d^{2}}{2 f \,d^{3} \left (c^{4}+2 c^{2} d^{2}+d^{4}\right )}-\frac {2 \left (a^{4} c \,d^{4}-2 a^{3} b \,c^{2} d^{3}+2 a^{3} b \,d^{5}-6 a^{2} b^{2} c \,d^{4}+2 a \,b^{3} c^{4} d +6 a \,b^{3} c^{2} d^{3}-b^{4} c^{5}-2 b^{4} c^{3} d^{2}\right ) \tan \left (f x +e \right )}{f \,d^{2} \left (c^{4}+2 c^{2} d^{2}+d^{4}\right )}+\frac {2 d \left (a^{4} c^{3}-3 a^{4} c \,d^{2}+12 a^{3} b \,c^{2} d -4 a^{3} b \,d^{3}-6 a^{2} b^{2} c^{3}+18 a^{2} b^{2} c \,d^{2}-12 a \,b^{3} c^{2} d +4 a \,b^{3} d^{3}+b^{4} c^{3}-3 b^{4} c \,d^{2}\right ) c x \tan \left (f x +e \right )}{\left (c^{4}+2 c^{2} d^{2}+d^{4}\right ) \left (c^{2}+d^{2}\right )}}{\left (c +d \tan \left (f x +e \right )\right )^{2}}+\frac {\left (3 a^{4} c^{2} d^{4}-a^{4} d^{6}-4 a^{3} b \,c^{3} d^{3}+12 a^{3} b c \,d^{5}-18 a^{2} b^{2} c^{2} d^{4}+6 a^{2} b^{2} d^{6}+4 a \,b^{3} c^{3} d^{3}-12 a \,b^{3} c \,d^{5}+b^{4} c^{6}+3 b^{4} c^{4} d^{2}+6 b^{4} c^{2} d^{4}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{\left (c^{6}+3 c^{4} d^{2}+3 c^{2} d^{4}+d^{6}\right ) f \,d^{3}}-\frac {\left (3 a^{4} c^{2} d -a^{4} d^{3}-4 a^{3} b \,c^{3}+12 a^{3} b c \,d^{2}-18 a^{2} b^{2} c^{2} d +6 a^{2} b^{2} d^{3}+4 a \,b^{3} c^{3}-12 a \,b^{3} c \,d^{2}+3 b^{4} c^{2} d -b^{4} d^{3}\right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f \left (c^{6}+3 c^{4} d^{2}+3 c^{2} d^{4}+d^{6}\right )}\) | \(952\) |
risch | \(\text {Expression too large to display}\) | \(2372\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.62, size = 646, normalized size = 1.59 \begin {gather*} \frac {\frac {2 \, {\left ({\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{3} + 12 \, {\left (a^{3} b - a b^{3}\right )} c^{2} d - 3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c d^{2} - 4 \, {\left (a^{3} b - a b^{3}\right )} d^{3}\right )} {\left (f x + e\right )}}{c^{6} + 3 \, c^{4} d^{2} + 3 \, c^{2} d^{4} + d^{6}} + \frac {2 \, {\left (b^{4} c^{6} + 3 \, b^{4} c^{4} d^{2} - 4 \, {\left (a^{3} b - a b^{3}\right )} c^{3} d^{3} + 3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + 2 \, b^{4}\right )} c^{2} d^{4} + 12 \, {\left (a^{3} b - a b^{3}\right )} c d^{5} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} d^{6}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{c^{6} d^{3} + 3 \, c^{4} d^{5} + 3 \, c^{2} d^{7} + d^{9}} + \frac {{\left (4 \, {\left (a^{3} b - a b^{3}\right )} c^{3} - 3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{2} d - 12 \, {\left (a^{3} b - a b^{3}\right )} c d^{2} + {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} d^{3}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{6} + 3 \, c^{4} d^{2} + 3 \, c^{2} d^{4} + d^{6}} + \frac {3 \, b^{4} c^{6} - 4 \, a b^{3} c^{5} d - 4 \, a^{3} b c d^{5} - a^{4} d^{6} - {\left (6 \, a^{2} b^{2} - 7 \, b^{4}\right )} c^{4} d^{2} + 4 \, {\left (3 \, a^{3} b - 5 \, a b^{3}\right )} c^{3} d^{3} - {\left (5 \, a^{4} - 18 \, a^{2} b^{2}\right )} c^{2} d^{4} + 4 \, {\left (b^{4} c^{5} d - 2 \, a b^{3} c^{4} d^{2} + 2 \, b^{4} c^{3} d^{3} - 2 \, a^{3} b d^{6} + 2 \, {\left (a^{3} b - 3 \, a b^{3}\right )} c^{2} d^{4} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} c d^{5}\right )} \tan \left (f x + e\right )}{c^{6} d^{3} + 2 \, c^{4} d^{5} + c^{2} d^{7} + {\left (c^{4} d^{5} + 2 \, c^{2} d^{7} + d^{9}\right )} \tan \left (f x + e\right )^{2} + 2 \, {\left (c^{5} d^{4} + 2 \, c^{3} d^{6} + c d^{8}\right )} \tan \left (f x + e\right )}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1259 vs.
\(2 (409) = 818\).
time = 1.24, size = 1259, normalized size = 3.10 \begin {gather*} \frac {b^{4} c^{6} d^{2} + 4 \, a b^{3} c^{5} d^{3} - 4 \, a^{3} b c d^{7} - a^{4} d^{8} - {\left (18 \, a^{2} b^{2} - 7 \, b^{4}\right )} c^{4} d^{4} + 20 \, {\left (a^{3} b - a b^{3}\right )} c^{3} d^{5} - {\left (7 \, a^{4} - 18 \, a^{2} b^{2}\right )} c^{2} d^{6} + 2 \, {\left ({\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{5} d^{3} + 12 \, {\left (a^{3} b - a b^{3}\right )} c^{4} d^{4} - 3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{3} d^{5} - 4 \, {\left (a^{3} b - a b^{3}\right )} c^{2} d^{6}\right )} f x - {\left (3 \, b^{4} c^{6} d^{2} - 4 \, a b^{3} c^{5} d^{3} - 12 \, a^{3} b c d^{7} + a^{4} d^{8} - 3 \, {\left (2 \, a^{2} b^{2} - 3 \, b^{4}\right )} c^{4} d^{4} + 4 \, {\left (3 \, a^{3} b - 7 \, a b^{3}\right )} c^{3} d^{5} - 5 \, {\left (a^{4} - 6 \, a^{2} b^{2}\right )} c^{2} d^{6} - 2 \, {\left ({\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{3} d^{5} + 12 \, {\left (a^{3} b - a b^{3}\right )} c^{2} d^{6} - 3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c d^{7} - 4 \, {\left (a^{3} b - a b^{3}\right )} d^{8}\right )} f x\right )} \tan \left (f x + e\right )^{2} + {\left (b^{4} c^{8} + 3 \, b^{4} c^{6} d^{2} - 4 \, {\left (a^{3} b - a b^{3}\right )} c^{5} d^{3} + 3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + 2 \, b^{4}\right )} c^{4} d^{4} + 12 \, {\left (a^{3} b - a b^{3}\right )} c^{3} d^{5} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} c^{2} d^{6} + {\left (b^{4} c^{6} d^{2} + 3 \, b^{4} c^{4} d^{4} - 4 \, {\left (a^{3} b - a b^{3}\right )} c^{3} d^{5} + 3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + 2 \, b^{4}\right )} c^{2} d^{6} + 12 \, {\left (a^{3} b - a b^{3}\right )} c d^{7} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} d^{8}\right )} \tan \left (f x + e\right )^{2} + 2 \, {\left (b^{4} c^{7} d + 3 \, b^{4} c^{5} d^{3} - 4 \, {\left (a^{3} b - a b^{3}\right )} c^{4} d^{4} + 3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + 2 \, b^{4}\right )} c^{3} d^{5} + 12 \, {\left (a^{3} b - a b^{3}\right )} c^{2} d^{6} - {\left (a^{4} - 6 \, a^{2} b^{2}\right )} c d^{7}\right )} \tan \left (f x + e\right )\right )} \log \left (\frac {d^{2} \tan \left (f x + e\right )^{2} + 2 \, c d \tan \left (f x + e\right ) + c^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) - {\left (b^{4} c^{8} + 3 \, b^{4} c^{6} d^{2} + 3 \, b^{4} c^{4} d^{4} + b^{4} c^{2} d^{6} + {\left (b^{4} c^{6} d^{2} + 3 \, b^{4} c^{4} d^{4} + 3 \, b^{4} c^{2} d^{6} + b^{4} d^{8}\right )} \tan \left (f x + e\right )^{2} + 2 \, {\left (b^{4} c^{7} d + 3 \, b^{4} c^{5} d^{3} + 3 \, b^{4} c^{3} d^{5} + b^{4} c d^{7}\right )} \tan \left (f x + e\right )\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right ) - 2 \, {\left (b^{4} c^{7} d + 4 \, a^{3} b d^{8} - 3 \, {\left (2 \, a^{2} b^{2} - b^{4}\right )} c^{5} d^{3} + 4 \, {\left (2 \, a^{3} b - 3 \, a b^{3}\right )} c^{4} d^{4} - {\left (3 \, a^{4} - 18 \, a^{2} b^{2} + 4 \, b^{4}\right )} c^{3} d^{5} - 12 \, {\left (a^{3} b - a b^{3}\right )} c^{2} d^{6} + 3 \, {\left (a^{4} - 4 \, a^{2} b^{2}\right )} c d^{7} - 2 \, {\left ({\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{4} d^{4} + 12 \, {\left (a^{3} b - a b^{3}\right )} c^{3} d^{5} - 3 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} c^{2} d^{6} - 4 \, {\left (a^{3} b - a b^{3}\right )} c d^{7}\right )} f x\right )} \tan \left (f x + e\right )}{2 \, {\left ({\left (c^{6} d^{5} + 3 \, c^{4} d^{7} + 3 \, c^{2} d^{9} + d^{11}\right )} f \tan \left (f x + e\right )^{2} + 2 \, {\left (c^{7} d^{4} + 3 \, c^{5} d^{6} + 3 \, c^{3} d^{8} + c d^{10}\right )} f \tan \left (f x + e\right ) + {\left (c^{8} d^{3} + 3 \, c^{6} d^{5} + 3 \, c^{4} d^{7} + c^{2} d^{9}\right )} f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: AttributeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1066 vs.
\(2 (409) = 818\).
time = 1.21, size = 1066, normalized size = 2.63 \begin {gather*} \frac {\frac {2 \, {\left (a^{4} c^{3} - 6 \, a^{2} b^{2} c^{3} + b^{4} c^{3} + 12 \, a^{3} b c^{2} d - 12 \, a b^{3} c^{2} d - 3 \, a^{4} c d^{2} + 18 \, a^{2} b^{2} c d^{2} - 3 \, b^{4} c d^{2} - 4 \, a^{3} b d^{3} + 4 \, a b^{3} d^{3}\right )} {\left (f x + e\right )}}{c^{6} + 3 \, c^{4} d^{2} + 3 \, c^{2} d^{4} + d^{6}} + \frac {{\left (4 \, a^{3} b c^{3} - 4 \, a b^{3} c^{3} - 3 \, a^{4} c^{2} d + 18 \, a^{2} b^{2} c^{2} d - 3 \, b^{4} c^{2} d - 12 \, a^{3} b c d^{2} + 12 \, a b^{3} c d^{2} + a^{4} d^{3} - 6 \, a^{2} b^{2} d^{3} + b^{4} d^{3}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{6} + 3 \, c^{4} d^{2} + 3 \, c^{2} d^{4} + d^{6}} + \frac {2 \, {\left (b^{4} c^{6} + 3 \, b^{4} c^{4} d^{2} - 4 \, a^{3} b c^{3} d^{3} + 4 \, a b^{3} c^{3} d^{3} + 3 \, a^{4} c^{2} d^{4} - 18 \, a^{2} b^{2} c^{2} d^{4} + 6 \, b^{4} c^{2} d^{4} + 12 \, a^{3} b c d^{5} - 12 \, a b^{3} c d^{5} - a^{4} d^{6} + 6 \, a^{2} b^{2} d^{6}\right )} \log \left ({\left | d \tan \left (f x + e\right ) + c \right |}\right )}{c^{6} d^{3} + 3 \, c^{4} d^{5} + 3 \, c^{2} d^{7} + d^{9}} - \frac {3 \, b^{4} c^{6} d \tan \left (f x + e\right )^{2} + 9 \, b^{4} c^{4} d^{3} \tan \left (f x + e\right )^{2} - 12 \, a^{3} b c^{3} d^{4} \tan \left (f x + e\right )^{2} + 12 \, a b^{3} c^{3} d^{4} \tan \left (f x + e\right )^{2} + 9 \, a^{4} c^{2} d^{5} \tan \left (f x + e\right )^{2} - 54 \, a^{2} b^{2} c^{2} d^{5} \tan \left (f x + e\right )^{2} + 18 \, b^{4} c^{2} d^{5} \tan \left (f x + e\right )^{2} + 36 \, a^{3} b c d^{6} \tan \left (f x + e\right )^{2} - 36 \, a b^{3} c d^{6} \tan \left (f x + e\right )^{2} - 3 \, a^{4} d^{7} \tan \left (f x + e\right )^{2} + 18 \, a^{2} b^{2} d^{7} \tan \left (f x + e\right )^{2} + 2 \, b^{4} c^{7} \tan \left (f x + e\right ) + 8 \, a b^{3} c^{6} d \tan \left (f x + e\right ) + 6 \, b^{4} c^{5} d^{2} \tan \left (f x + e\right ) - 32 \, a^{3} b c^{4} d^{3} \tan \left (f x + e\right ) + 56 \, a b^{3} c^{4} d^{3} \tan \left (f x + e\right ) + 22 \, a^{4} c^{3} d^{4} \tan \left (f x + e\right ) - 132 \, a^{2} b^{2} c^{3} d^{4} \tan \left (f x + e\right ) + 28 \, b^{4} c^{3} d^{4} \tan \left (f x + e\right ) + 72 \, a^{3} b c^{2} d^{5} \tan \left (f x + e\right ) - 48 \, a b^{3} c^{2} d^{5} \tan \left (f x + e\right ) - 2 \, a^{4} c d^{6} \tan \left (f x + e\right ) + 12 \, a^{2} b^{2} c d^{6} \tan \left (f x + e\right ) + 8 \, a^{3} b d^{7} \tan \left (f x + e\right ) + 4 \, a b^{3} c^{7} + 6 \, a^{2} b^{2} c^{6} d - b^{4} c^{6} d - 24 \, a^{3} b c^{5} d^{2} + 36 \, a b^{3} c^{5} d^{2} + 14 \, a^{4} c^{4} d^{3} - 66 \, a^{2} b^{2} c^{4} d^{3} + 11 \, b^{4} c^{4} d^{3} + 28 \, a^{3} b c^{3} d^{4} - 16 \, a b^{3} c^{3} d^{4} + 3 \, a^{4} c^{2} d^{5} + 4 \, a^{3} b c d^{6} + a^{4} d^{7}}{{\left (c^{6} d^{2} + 3 \, c^{4} d^{4} + 3 \, c^{2} d^{6} + d^{8}\right )} {\left (d \tan \left (f x + e\right ) + c\right )}^{2}}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 10.25, size = 578, normalized size = 1.42 \begin {gather*} -\frac {\ln \left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (\frac {d^6\,\left (a^4-6\,a^2\,b^2\right )-c^2\,\left (d^4\,\left (3\,a^4-18\,a^2\,b^2+6\,b^4\right )-3\,b^4\,d^4\right )+b^4\,d^6-c^3\,d^3\,\left (4\,a\,b^3-4\,a^3\,b\right )+c\,d^5\,\left (12\,a\,b^3-12\,a^3\,b\right )}{c^6\,d^3+3\,c^4\,d^5+3\,c^2\,d^7+d^9}-\frac {b^4}{d^3}\right )}{f}-\frac {\frac {5\,a^4\,c^2\,d^4+a^4\,d^6-12\,a^3\,b\,c^3\,d^3+4\,a^3\,b\,c\,d^5+6\,a^2\,b^2\,c^4\,d^2-18\,a^2\,b^2\,c^2\,d^4+4\,a\,b^3\,c^5\,d+20\,a\,b^3\,c^3\,d^3-3\,b^4\,c^6-7\,b^4\,c^4\,d^2}{2\,d^3\,\left (c^4+2\,c^2\,d^2+d^4\right )}-\frac {2\,\mathrm {tan}\left (e+f\,x\right )\,\left (-a^4\,c\,d^4+2\,a^3\,b\,c^2\,d^3-2\,a^3\,b\,d^5+6\,a^2\,b^2\,c\,d^4-2\,a\,b^3\,c^4\,d-6\,a\,b^3\,c^2\,d^3+b^4\,c^5+2\,b^4\,c^3\,d^2\right )}{d^2\,\left (c^4+2\,c^2\,d^2+d^4\right )}}{f\,\left (c^2+2\,c\,d\,\mathrm {tan}\left (e+f\,x\right )+d^2\,{\mathrm {tan}\left (e+f\,x\right )}^2\right )}+\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (a^4-a^3\,b\,4{}\mathrm {i}-6\,a^2\,b^2+a\,b^3\,4{}\mathrm {i}+b^4\right )}{2\,f\,\left (-c^3\,1{}\mathrm {i}-3\,c^2\,d+c\,d^2\,3{}\mathrm {i}+d^3\right )}+\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (a^4\,1{}\mathrm {i}-4\,a^3\,b-a^2\,b^2\,6{}\mathrm {i}+4\,a\,b^3+b^4\,1{}\mathrm {i}\right )}{2\,f\,\left (-c^3-c^2\,d\,3{}\mathrm {i}+3\,c\,d^2+d^3\,1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________